package com.ship.common.core.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ship.common.core.mapping.Label;
import com.ship.common.core.mapping.SearchItem;
import com.ship.common.core.mapping.TableColumn;
import lombok.Data;

import java.util.Date;

/**
 * @author 31463
 */
@TableName("export")
@Data
public class Export extends BaseBean {

    /**
     *
     */
    private static final long serialVersionUID = -4231502053832104775L;

    @Label(value = "导出人名称")
    @SearchItem
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @Label(value = "文件名称")
    @TableColumn
    @SearchItem
    private String fileName;

    private String filePath;

    @Label(value = "文件大小")
    @TableColumn
    private String fileSize;

    @Label(value = "处理时间")
    @TableColumn(priority = 6)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dealDate;

    @Label(value = "处理用时(秒)")
    private Integer dealSeconds;

    @Label(value = "导出状态", enumContent = "导出状态")
    @SearchItem
    @TableColumn
    private Integer status;


    @Label(value = "提交时间")
    @TableColumn
    @SearchItem
    @TableField(fill = FieldFill.INSERT)
    private Date createDate;

    @Label(value = "序号")
    @TableField(exist = false)
    private Integer orderNumber;

    private Long userId;

    public Export(String fileName,Long userId) {
        this.fileName = fileName;
        this.status = 0;
        this.userId = userId;
    }
    public Export(){

    }
}
